package com.example.tilitili.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.tilitili.pojo.Order;
import com.example.tilitili.pojo.User;
import com.example.tilitili.vo.GoodsVo;
import com.example.tilitili.vo.OrderDetailVo;
import com.example.tilitili.vo.OrderVo;

import java.util.List;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liu
 * @since 2022-01-17
 */
public interface IOrderService extends IService<Order> {
    /**
     * 秒杀
     * @param user
     * @param goods
     * @return
     */
    Order seckill(User user, GoodsVo goods);

    /**
     * 订单详情
     * @param orderId
     * @return
     */
    OrderDetailVo detail(Long orderId);

    /**
     * 生成秒杀地址
     * @param user
     * @param goodsId
     * @return
     */
    String createPath(User user, Long goodsId);
    /**
     * 验证秒杀地址
     * @param user
     * @param goodsId
     * @param path
     * @return
     */
    boolean checkPath(User user, Long goodsId, String path);

    /**
<<<<<<< HEAD
     * 校验验证码
     * @param user
     * @param goodsId
     * @param captcha
     * @return
     */
    boolean checkCaptcha(User user, Long goodsId, String captcha);
     /* 获取全部订单
     * @return
     */
    List <OrderVo> findOrderVo();

    /**
     * 根据订单id获取订单详情
     */
    OrderDetailVo findOrderDetailVoByOrderId(Long orderId);
}
